<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>操作节点的属性</title>
  <script type="text/javascript" src="../script/jquery-3.6.0.min.js"></script>
  <script type="text/javascript">
    $(function () {
      //给button绑定一个click事件
      $("button").click(function () {
        $("img").attr("src", "../image/1.png");
        $("img").attr("height", "200");
      })
    });
  </script>
</head>
<body>
<img src="../image/2.png" height="100"/>
<br/>
<button>设置图像的 height 属性</button>
</body>
</html>